import './index.css'
import { Backdrop } from '../Backdrop/index'

const confirmModal = props => {
  const { content, onConfirm, onCancel } = props
  return (
    <Backdrop>
      <div className='confirm-modal'>
        <div className='confirm-modal-close' onClick={onCancel}>
          x
        </div>
        <h3>{content || '确定删除吗？'}</h3>
        <div className='confirm-modal-btn'>
          <button onClick={onCancel}>取消</button>
          <button onClick={onConfirm}>确定</button>
        </div>
      </div>
    </Backdrop>
  )
}
export default confirmModal
